<!-- 顶部导航条 start -->
<div class="header-top">
    <div class="am-container header">
        <ul class="top-nav-left">
            <div class="top-nav-items">
                <div class="menu-hd">
                    {{if empty($user)}}
                        <em>您好，欢迎来到</em>
                        <em>{{:MyC('home_site_name')}}</em>
                        {{if MyC('home_user_login_state') eq 1}}
                            [<a href="{{:MyUrl('index/user/logininfo')}}">登录</a>]
                        {{/if}}
                        {{if in_array('sms', MyC('home_user_reg_state')) or in_array('email', MyC('home_user_reg_state')) or in_array('username', MyC('home_user_reg_state'))}}
                            [<a href="{{:MyUrl('index/user/regInfo')}}">注册</a>]
                        {{/if}}
                    {{else /}}
                        <em>您好</em>
                        {{if !empty($user['icon'])}}
                            <img src="{{$user.icon}}" class="common-user-icon" {{if !empty($user['icon_title'])}}title="{{$user.icon_title}}"{{/if}} />
                        {{/if}}
                        <em>{{$user.user_name_view}}，欢迎来到</em>
                        <em>{{:MyC('home_site_name')}}</em>
                        [<a href="{{:MyUrl('index/user/logout')}}">退出</a>]
                    {{/if}}

                    <!-- 公共顶部小导航钩子-左侧 -->
                    {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
                        <div class="plugins-tag">
                            <span>plugins_view_header_navigation_top_left</span>
                        </div>
                    {{/if}}
                    {{if !empty($plugins_view_header_navigation_top_left_data) and is_array($plugins_view_header_navigation_top_left_data) and (!isset($is_footer) or $is_footer eq 1)}}
                        {{foreach $plugins_view_header_navigation_top_left_data as $hook}}
                            {{if is_string($hook) or is_int($hook)}}
                                {{$hook|raw}}
                            {{/if}}
                        {{/foreach}}
                    {{/if}}
                </div>
            </div>
        </ul>
        <ul class="top-nav-right">
            {{foreach $common_nav_top_right_list as $nav}}
                {{if empty($nav['items'])}}
                    <div class="top-nav-items">
                        <div class="menu-hd {{if isset($nav['is_login']) and $nav['is_login'] eq 1 and empty($user)}}login-event{{/if}}">
                            <a href="{{if empty($user)}}javascript:;{{else /}}{{$nav.url}}{{/if}}" target="_top">
                                <i class="am-icon-fw {{$nav.icon}}"></i>
                                <span>{{$nav.name}}</span>
                                {{if isset($nav['badge']) and $nav['badge'] gt -1}}
                                    {{if $nav['badge'] gt 0}}
                                        <strong class="am-badge am-badge-danger am-round common-cart-total">{{$nav.badge}}</strong>
                                    {{else /}}
                                        <strong class="common-cart-total am-round">{{$nav.badge}}</strong>
                                    {{/if}}
                                {{/if}}
                            </a>
                        </div>
                    </div>
                {{else /}}
                    <div class="top-nav-items">
                        <div class="am-dropdown menu-hd {{if isset($nav['is_login']) and $nav['is_login'] eq 1 and empty($user)}}login-event{{/if}}" data-am-dropdown>
                            <a class="am-dropdown-toggle" href="javascript:;" target="_top" data-am-dropdown-toggle>
                                <i class="am-icon-fw {{$nav.icon}}"></i>
                                <span>{{$nav.name}}</span>
                                <i class="am-icon-angle-down"></i>
                            </a>
                            {{if !empty($user)}}
                                <ul class="am-dropdown-content">
                                    {{foreach $nav.items as $navs}}
                                        <li>
                                            <a href="{{if empty($user)}}javascript:;{{else /}}{{$navs.url}}{{/if}}">{{$navs.name}}</a>
                                        </li>
                                    {{/foreach}}
                                </ul>
                            {{/if}}
                        </div>
                    </div>
                {{/if}}
            {{/foreach}}
        </ul>
    </div>
</div>
<!-- 顶部导航条 end